Creating User Toolbars in HyperMesh

tinh
tinh Altair Community Member
edited April 2022 in Community Q&A

Hi B)

I made this package to help creating user toolbars: 

It is useful for someone has many scripts and wants them to be available by one clicking on HM GUI

Please notice me if any bug occurs.

example:


 

 

Enter here to download:

 https://community.altair.com/community?id=community_blog&sys_id=0e6d8e3f1b64ac90c4dfdbd9dc4bcbd5

Answers

  • Brian DO_20786
    Brian DO_20786 Altair Community Member
    edited February 2018

    GreatB)/emoticons/default_cool.png' title='B)' />

  • llyle_20499
    llyle_20499 New Altair Community Member
    edited February 2018

    Nice work. Will save a lot of time. 

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited February 2018

    @tinh: Is there any possibility to install into user's folder instead of HM Installation folder?

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited February 2018

    When I click on 'Add Command bouton' there's error:

    screenshot_28.png.1acaad21371f89786837069c7dea28aa.png

     

    HW 2017.2.1

    OS Linux CentOS 7 x64

     

  • tinh
    tinh Altair Community Member
    edited February 2018

    @tinh: Is there any possibility to install into user's folder instead of HM Installation folder?

     

    Yes, there is. But at least we need to add a package index file in hm home as an entry point for auto-start, or you have to add source $tboptsfile to hmcustom.tcl, or source it each time open hypermesh

    I will make an Installer that help to select user's folder to install tbopts, this is better than you have to make it your self

  • tinh
    tinh Altair Community Member
    edited February 2018

    About linux OS, I will check environment folder and update the error soon.

  • tinh
    tinh Altair Community Member
    edited February 2018

     

    Yes, there is. But at least we need to add a package index file in hm home as an entry point for auto-start, or you have to add source $tboptsfile to hmcustom.tcl, or source it each time open hypermesh

    I will make an Installer that help to select user's folder to install tbopts, this is better than you have to make it your self

     

     

    I updated it with an installer.tcl file. Just copy folder tbopts to your own location, open hypermesh and File>Run>Tcl/Tk Scripts to run Installer.tcl

    folder .../hm/script need to be writable, because pkgIndex will be copied there

  • vipin_22401
    vipin_22401 Altair Community Member
    edited March 2018

    Hi tinh,

     

    Could you please tell me how to encrypt the .tcl file as you did?

    Is there any free software available for encrypting?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    Hello Tinh,

    I'm not able to access this file.

     

  • tinh
    tinh Altair Community Member
    edited August 2018
  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    Hello Tinh,

     

    I tried to use your script in my work enviroment, where I'm using multiple hmcustom files. I don't want (and cannot) modify most of them. 

    I would like to modify only the certain one. The one I've created and added (by appending the enviromental variable) myself.

     

    I have managed to add 'tbopt' script in this file manually (basing on your instalation scripts). Now i would like to make your script to modify only the certain hmcustom file in the process of adding toolbars and buttons. Can you show me the way?

     

    Regards,
    Michal

  • tinh
    tinh Altair Community Member
    edited August 2018

    Hi

    Tbopts.tcl does not modify hmcustom.tcl

    Just installer.tcl does

  • Rakesh_kumar
    Rakesh_kumar Altair Community Member
    edited August 2020

    Hi Mr. Tinh

     

    The got the following error message while running add toolbar script.

     

    tag name 'Undo-Redo' # must be alphanum should not contain any wildcharacters
    tag name 'Undo-Redo' # must be alphanum should not contain any wildcharacters
        while executing
    '::hwtk::istagvalid $tag'
        (object '::.tbopts.f1.lb' method '::hwtk::widget::HWListbox::add' body line 7)
        invoked from within
    '# Compiled -- no source code available
    error 'called a copy of a compiled script''
        (procedure 'p_mnuOptions_Invoke' line 1)
        invoked from within
    'p_mnuOptions_Invoke'
        (in namespace inscope '::tbopts' script line 1)
        invoked from within
    '::namespace inscope ::tbopts p_mnuOptions_Invoke'
        (menu invoke)

     

    Hm version 2019.1

     

    Thanks in advance

     

     

  • tinh
    tinh Altair Community Member
    edited August 2020

    Sorry, could you test it on hm2017?

    I don't have v2019 so i need to confirm the bug comes from new version or something else

  • JiWon Seo_20453
    JiWon Seo_20453
    Altair Employee
    edited November 2020

    Hello! I want to download your script! 

    But I can not find... Could you share the script? 

     

    Thanks in advance.

    Jiwon Seo

  • tinh
    tinh Altair Community Member
    edited November 2020

    Hello! I want to download your script! 

    But I can not find... Could you share the script? 

     

    Thanks in advance.

    Jiwon Seo

    Hi Jiwon,

    This is yours:

    https://community.altair.com/community?id=community_blog&sys_id=0e6d8e3f1b64ac90c4dfdbd9dc4bcbd5

  • JiWon Seo_20453
    JiWon Seo_20453
    Altair Employee
    edited November 2020
    tinh said:

    I want to use your script! but I can not download in anywhere.. 

    Could you share it? 

     

    Best Regards,

    Jiwon Seo

  • Brian DO_21608
    Brian DO_21608 Altair Community Member
    edited September 2021

    How about 2021.2 version ?

  • Adeline War_20893
    Adeline War_20893 Altair Community Member
    edited April 2022

     

    Yes, there is. But at least we need to add a package index file in hm home as an entry point for auto-start, or you have to add source $tboptsfile to hmcustom.tcl, or source it each time open hypermesh

    I will make an Installer that help to select user's folder to install tbopts, this is better than you have to make it your self

     

     

    I updated it with an installer.tcl file. Just copy folder tbopts to your own location, open hypermesh and File>Run>Tcl/Tk Scripts to run Installer.tcl

    folder .../hm/script need to be writable, because pkgIndex will be copied there

    Hello, @tinh May I please get your email id so I can contact you directly for any query?

     

    Also, I would like to know if there are control cards to call a .txt file for contact deformation/contact sliding distance and stress?

     

    Thank you,

    Adeline